#!/bin/bash

which true
which false

true && echo 1 || echo 2 && echo 3 || echo 4
true || echo 1 && echo 2 || echo 3 && echo 4

true  && true  && true  && true  && echo true
false && true  && true  && true  && echo cannot true
true  && false && true  && true  && echo cannot true
true  && true  && false && true  && echo cannot true
true  && true  && true  && false && echo cannot true

false || false || false || false || echo false
true  || false || false || false || echo cannot false
false || true  || false || false || echo cannot false
false || false || true  || false || echo cannot false
false || false || false || true  || echo cannot false

true  && true  && echo "cond1 && true" || echo "cond1 && false"
true  && false && echo "cond2 && true" || echo "cond2 && false"
false && true  && echo "cond3 && true" || echo "cond3 && false"
false && false && echo "cond4 && true" || echo "cond4 && false"
true  || true  && echo "cond1 || true" || echo "cond1 || false"
true  || false && echo "cond2 || true" || echo "cond2 || false"
false || true  && echo "cond3 || true" || echo "cond3 || false"
false || false && echo "cond4 || true" || echo "cond4 || false"

echo fake
true  && true  || echo "cond1 && false" && echo "cond1 && true"
true  && false || echo "cond2 && false" && echo "cond2 && true"
false && true  || echo "cond3 && false" && echo "cond3 && true"
false && false || echo "cond4 && false" && echo "cond4 && true"
true  || true  || echo "cond1 || false" && echo "cond1 || true"
true  || false || echo "cond2 || false" && echo "cond2 || true"
false || true  || echo "cond3 || false" && echo "cond3 || true"
false || false || echo "cond4 || false" && echo "cond4 || true"

echo 1;echo 2;echo 1;echo 2;
echo same as
echo 1
echo 2
echo 1
echo 2
